package com.elitetyc.eliteim.client.command.impl;

import com.elitetyc.eliteim.common.util.MsgUtil;
import com.elitetyc.eliteim.client.command.InnerCommand;
import com.elitetyc.eliteim.client.command.InnerCommandFactory;
import com.elitetyc.eliteim.client.command.anno.Command;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author yuanchao.tan
 * @version 1.0
 * @description 输出所有内部命令
 * @Date 2021/9/17 14:31
 */
@Command(command = ":all", desc = "获取所有内部命令")
public class AllInnerCommand implements InnerCommand {

    @Autowired
    InnerCommandFactory innerCommandFactory;


    @Override
    public void process(String msg) {
        for (InnerCommandFactory.InnerCommandInfo commandInfo : innerCommandFactory.innerCommandInfoHashMap.values()) {
            MsgUtil.echoMsg(commandInfo.getCommand()+"-->"+commandInfo.getDesc());
        }
    }


}
